package com.xbongbong.paas.pojo.workflow.task.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import com.xbongbong.pro.formdata.pojo.SaasSpecialParamPojo;
import com.xbongbong.sys.domain.entity.UserEntity;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * @author chenpeng
 * @version 1.0
 * @date 2021-05-25 13:46
 * @description
 */
@Setter
@Getter
public class WorkflowNodeTaskGetDTO extends BaseDTO {
    
    private static final long serialVersionUID = 4511392858712645699L;
    
    /**
     * 应用id
     */
    private Long appId;
    
    /**
     * 菜单id
     */
    private Long menuId;
    /**
     * 表单id
     */
    @NotNull(message = "{dto.msg.workflowNodeTaskGet.formId.NotNull}")
    private Long formId;
    /**
     * 是否是saas 1：saas  2：paas
     */
    @DecimalMin(value = "1", message = "{dto.msg.workflowNodeTaskGet.saasMark.DecimalMin}")
    @DecimalMax(value = "2", message = "{dto.msg.workflowNodeTaskGet.saasMark.DecimalMax}")
    @NotNull(message = "{dto.msg.workflowNodeTaskGet.saasMark.NotNull}")
    private Integer saasMark;
    
    /**
     * saas业务类型
     */
    private Integer businessType;
    
    /**
     * 流程任务id
     */
    @NotNull(message = "{dto.msg.workflowNodeTaskGet.processNodeTaskId.NotNull}")
    private Long processNodeTaskId;
    
    /**
     * 表单数据
     */
    @NotNull(message = "{dto.msg.workflowNodeTaskGet.processTaskId.NotNull}")
    private Long processTaskId;
    
    /**
     * 流程类型
     */
    @NotNull(message = "{dto.msg.workflowNodeTaskGet.processType.NotNull}")
    private String processType;
    
    /**
     * 红冲发票用
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private SaasSpecialParamPojo saasSpecialParamPojo;
    
    private Integer del;
    
    private Boolean fromDingtalk;

    /**
     * 用户部门容器
     */
    private Map<String, UserEntity> userMap;

    /**
     * 首页是否要日志
     */
    private Integer needRecords;

    /**
     * 首页是否要操作按钮
     */
    private Integer needOperate;



    public WorkflowNodeTaskGetDTO(){
        del = 0;
        fromDingtalk = false;
    }
}
